// import request from '@/utils/request1'

// export const login = ({adminname,password})=>{
//   return request({
//     url:'admin/login',
//     method:'POST',
//     data:{
//       adminname,
//       password
//     }
//   })
// }

import request from '@/utils/request'

export function login(data) {
  return request({
    url: 'admin/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: 'admin/detail',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}